package com.hooper.cmn.client;

import com.hooper.hospital.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Tim Hooper
 * @version 1.0
 * @time 2022/09/28/23:20
 * @FeignClient(name) the name is the service that you wanna call remotely
 */
@Component
@FeignClient("service-cmn")
public interface DictClient {

    /**
     * get the specific name of the dict
     *
     * @param dictCode
     * @param value
     * @return
     */
    @GetMapping("/admin/dict/getDictName/{dictCode}/{value}")
    String getDictName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);

    /**
     * get the specific name of the dict
     *
     * @param value make sure the @PathVariable(value=) value is input
     * @return
     */
    @GetMapping("/admin/dict/getDictName/{value}")
    String getLocation(@PathVariable("value") String value);
}
